package edu.hwadee.BEIS.entity;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * TrainingRoom entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "trainingroom", catalog = "beis")

public class TrainingRoom implements java.io.Serializable {

	// Fields

	private Integer trainingRoomId;
	private WholeSchoolTrainingBase wholeSchoolTrainingBase;
	private MajorTrainingBase majorTrainingBase;
	private PublicTrainingBase publicTrainingBase;
	private TeachPlanBasicSituation teachPlanBasicSituation;
	private String trainingRoomName;
	private String trainingRoomDeviceList;

	// Constructors

	/** default constructor */
	public TrainingRoom() {
	}

	/** minimal constructor */
	public TrainingRoom(String trainingRoomName) {
		this.trainingRoomName = trainingRoomName;
	}

	/** full constructor */
	public TrainingRoom(WholeSchoolTrainingBase wholeSchoolTrainingBase, MajorTrainingBase majorTrainingBase,
			PublicTrainingBase publicTrainingBase, TeachPlanBasicSituation teachPlanBasicSituation,
			String trainingRoomName, String trainingRoomDeviceList) {
		this.wholeSchoolTrainingBase = wholeSchoolTrainingBase;
		this.majorTrainingBase = majorTrainingBase;
		this.publicTrainingBase = publicTrainingBase;
		this.teachPlanBasicSituation = teachPlanBasicSituation;
		this.trainingRoomName = trainingRoomName;
		this.trainingRoomDeviceList = trainingRoomDeviceList;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "training_room_id", unique = true, nullable = false)

	public Integer getTrainingRoomId() {
		return this.trainingRoomId;
	}

	public void setTrainingRoomId(Integer trainingRoomId) {
		this.trainingRoomId = trainingRoomId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "whole_school_trainingbase_id")

	public WholeSchoolTrainingBase getWholeSchoolTrainingBase() {
		return this.wholeSchoolTrainingBase;
	}

	public void setWholeSchoolTrainingBase(WholeSchoolTrainingBase wholeSchoolTrainingBase) {
		this.wholeSchoolTrainingBase = wholeSchoolTrainingBase;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "major_trainingbase_id")

	public MajorTrainingBase getMajorTrainingBase() {
		return this.majorTrainingBase;
	}

	public void setMajorTrainingBase(MajorTrainingBase majorTrainingBase) {
		this.majorTrainingBase = majorTrainingBase;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "public_trainingbase_id")

	public PublicTrainingBase getPublicTrainingBase() {
		return this.publicTrainingBase;
	}

	public void setPublicTrainingBase(PublicTrainingBase publicTrainingBase) {
		this.publicTrainingBase = publicTrainingBase;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "teachPlan_basic_situation_id")

	public TeachPlanBasicSituation getTeachPlanBasicSituation() {
		return this.teachPlanBasicSituation;
	}

	public void setTeachPlanBasicSituation(TeachPlanBasicSituation teachPlanBasicSituation) {
		this.teachPlanBasicSituation = teachPlanBasicSituation;
	}

	@Column(name = "training_room_name", nullable = false, length = 50)

	public String getTrainingRoomName() {
		return this.trainingRoomName;
	}

	public void setTrainingRoomName(String trainingRoomName) {
		this.trainingRoomName = trainingRoomName;
	}

	@Column(name = "training_room_device_list", length = 200)

	public String getTrainingRoomDeviceList() {
		return this.trainingRoomDeviceList;
	}

	public void setTrainingRoomDeviceList(String trainingRoomDeviceList) {
		this.trainingRoomDeviceList = trainingRoomDeviceList;
	}

}